/* Copyright (C) 2009 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * Make every single class external so users can rely on their names
 */
@external .*;

@def black #000000;
@def white #ffffff;
@def norm-font  sans-serif;
@def mono-font  monospace;

@eval backgroundColor com.google.gerrit.client.Gerrit.getTheme().backgroundColor;
@eval topMenuColor com.google.gerrit.client.Gerrit.getTheme().topMenuColor;
@eval textColor com.google.gerrit.client.Gerrit.getTheme().textColor;
@eval trimColor com.google.gerrit.client.Gerrit.getTheme().trimColor;
@eval selectionColor com.google.gerrit.client.Gerrit.getTheme().selectionColor;
@eval changeTableOutdatedColor com.google.gerrit.client.Gerrit.getTheme().changeTableOutdatedColor;
@eval tableOddRowColor com.google.gerrit.client.Gerrit.getTheme().tableOddRowColor;
@eval tableEvenRowColor com.google.gerrit.client.Gerrit.getTheme().tableEvenRowColor;

@sprite .greenCheckClass {
  gwt-image: "greenCheck";
}

/** Override various GWT defaults */
.gerritTopMenu {
  font-size: 9pt;
  padding-left: 5px;
  padding-right: 5px;
  background: transparent;
}

body, table td, select {
  font-family: norm-font;
}

button {
  padding: 1px 6px;
}

.gerritBody {
  font-size: small;
  padding-left: 5px;
  padding-right: 5px;
}

a,
a:visited {
  color: #0654ac;
  text-decoration: none;
}

a:hover {
  color: #0654ac;
  text-decoration: underline;
}

#gerrit_btmmenu {
  clear: both;
  color: #a0adcc;
  text-align: right;
  padding-right: 10px;
}

.version a,
.version a:visited,
.version a:hover {
  color: #2a5db0;
}


/** Widgets **/
.gwt-Button {
  color: black;
}

.accountLinkPanel {
  display: inline;
}

.accountLinkPanel img {
  margin-right: 0.2em;
  position: relative;
  top: 2px;
  height: 16px !important;
  width: 16px;
}

.accountLinkPanel a {
  position: relative;
  top: -1px;
}

.inputFieldTypeHint {
  color: grey;
}

.smallHeading {
  margin-top: 5px;
  font-weight: bold;
}

.link {
  cursor: pointer;
}

.extensionPanel {
  padding-top: 10px;
}

/** MenuScreen **/
.menuScreenMenuBar {
  background: topMenuColor;
  padding-top: 0.5em;
  padding-bottom: 10em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  border-right: 1px solid black;
  margin-right: 0.5em;
}

.menuScreenMenuBar .menuItem {
  white-space: nowrap;
  display: block;
  border-right: none;
  padding: 0.2em;
}

.menuScreenMenuBar .menuItem.activeRow {
  background: selectionColor;
}

.menuItem.activeRow {
  background: selectionColor;
}

/** Menu **/
.linkMenuBar {
  font-size: 9pt;
  display: inline;
  white-space: nowrap;
  padding-left: 6px;
}
.menuItem {
  padding-left: 5px;
  padding-right: 5px;
}
.linkMenuItemNotLast {
  border-right: 1px solid black;
}

.topmenu {
  width: 100%;
}
.topmenuTDmenu {
  vertical-align: top;
}
.topmenuTDglue {
  width: 100%;
}

.topmenuMenuLeft {
  width: 300px;
  font-size: 9pt;
  padding-top: 5px;
  padding-left: 5px;
  padding-right: 5px;
  background: none;
  position: relative;
  top: 0;
}
.topmenuMenuLeft tbody tr td table {
  border: 0;
}
.topmenuMenuLeft tbody tr td table.gwt-TabBar {
  border-bottom: 1px solid #DDD;
}
.topmenuMenuLeft .gwt-TextBox {
  width: 250px;
}
.topmenuMenuLeft .gwt-Button {
  padding: 3px 6px;
}
.topmenuMenuLeft .gwt-TabBarFirst {
  display: none;
}
.topmenuMenuLeft .gwt-TabBarItem {
  margin: 0px;
  background: transparent;
  padding-top: 0px;
  padding-bottom: 1px;
  padding-left: 1em;
  padding-right: 1em;
}
.topmenuMenuLeft .gwt-TabBarRest {
  background: transparent;
  padding-top: 0px;
}
.topmenuMenuLeft .gwt-TabPanelBottom {
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  padding: 1px;
}
.topmenuMenuLeft .menuItem {
  padding-left: 1em;
  padding-right: 1em;
  border-right: none;
}

.topmenuMenuRight {
  float: right;
  text-align: right;
}
.menuBarUserName {
  padding-left: 5px;
  padding-right: 5px;
  white-space: nowrap;
}
.menuBarUserNameAvatar {
  vertical-align: middle;
}
.menuBarUserNameFocusPanel {
  display: inline;
}
.menuBarUserNamePanel {
  display: inline;
  cursor: pointer;
  font-weight: bold;
}
.userInfoPopup {
  border: 1px solid black;
  background: white;
  box-shadow: 3px 3px 5px #888;
  z-index: 200;
}
.searchPanel {
  white-space: nowrap;
  display: inline;
}
.searchPanel .searchTextBox {
  font-size: 9pt;
  margin: 8.286px 3px 0 0;
}
.searchPanel .searchDropdown {
  font-size: 8pt;
  border: 2px solid;
  border-color: rgba(0, 0, 0, 0.15);
  height: 16px;
  border-radius: 2px;
  box-sizing: content-box;
}
.searchPanel .searchButton {
  text-align: center;
  font-size: 8pt;
  font-weight: bold;
  cursor: pointer;
  border: 2px solid;
  color: #FFF;
  border-color: rgba(0, 0, 0, 0.15);
  height: 14px;
  background-color: #53A93F;
  border-radius: 2px;
  box-sizing: content-box;
}
.suggestBoxPopup {
  z-index: 200;
}

/** RPC Status **/
.rpcStatus {
  position: fixed;
  top: 6px;
  left: 50%;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 10px;
  padding-right: 10px;
  text-align: center;
  font-weight: bold;
  background: #FFF1A8;
  z-index: 200;
}


/** Error Dialog **/
.errorDialog {
  background: none;
  border: none;
  padding: 10px;
  width: 600px;
  color: backgroundColor;
  font-size: 15px;
  font-family: verdana;
  z-index: 200;
}
.errorDialogGlass {
  opacity: 0.75;
  z-index: 200;
}
@if user.agent safari {
  .errorDialogGlass {
    opacity: 0.80;
  }
}
@if user.agent ie8 {
  /* IE just doesn't do opacity the way we want, make our dialog
   * stand out in a way that it can't be missed against the page
   */
  .errorDialog {
    color: black;
    background: darkgray;
    border: 10px groove lightgrey;
  }
}
.errorDialogTitle {
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 15px;
}
.errorDialogErrorType {
  font-weight: bold;
  white-space: nowrap;
  margin-bottom: 15px;
}
.errorDialogButtons {
  width: 100%;
  margin-top: 15px;
}
.errorDialog a,
.errorDialog a:visited,
.errorDialog a:hover {
  color: white;
  font-weight: bold;
  font-size: 15px;
  font-family: verdana;
}
.loadingPluginsDialog {
  background: #fff;
  color: #000;
  width: auto;
}


/** Screen **/
.screen {
}

.screenHeader {
  white-space: nowrap;
  font-size: 16pt;
  margin: 3px 0 8px;
  text-overflow: ellipsis;
  overflow: hidden;
}

/** ChangeTable **/
.changeTable {
  border-collapse: separate;
  border-spacing: 0;
}

.changeTable tr:nth-child\(even\) {
  background: tableEvenRowColor;
}

.changeTable tr:nth-child\(odd\) {
  background: tableOddRowColor;
}

.changeTable .iconCell {
  width: 1px;
  padding: 0px;
  vertical-align: middle;
  border-bottom: 1px solid trimColor;
}

.changeTable .leftMostCell {
  border-left: 1px solid trimColor;
}

.changeTable .dataCell {
  padding-left: 5px;
  padding-right: 5px;
  border-right: 1px solid trimColor;
  border-bottom: 1px solid trimColor;
  vertical-align: middle;
  height: 20px;
}

.changeTable .dataCellHidden {
  display: none;
}

.changeTable a.gwt-InlineHyperlink,
.changeTable a.gwt-Anchor {
  color: #222 !important;
}

.changeTable .changeSize {
  height: 10px;
  display: inline-block;
  opacity: 0.6;
}

.accountDashboard.changeTable tr {
  color: #444444;
}
.accountDashboard.changeTable tr a {
  color: #444444;
  text-decoration: none;
}
.accountDashboard.changeTable .needsReview,
.accountDashboard.changeTable .needsReview a {
  font-weight: bold;
  color: textColor;
}

.changeTable .activeRow,
.accountDashboard.changeTable .activeRow,
.accountDashboard.changeTable .activeRow a {
  background: selectionColor !important;
}

.changeTable .cSIZE {
  width: 70px;
  text-align: right;
}

.changeTable .cSUBJECT div {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.changeTable .cASSIGNEDTOME {
  background: #ffe9d6 !important;
}

.changeTable .cASSIGNEE,
.changeTable .cOWNER,
.changeTable .cSTATUS {
  white-space: nowrap;
}

.changeTable .cLastUpdate {
  white-space: nowrap;
  text-align: right;
  width: 1em;
}

.changeTable .groupName {
  white-space: nowrap;
}

.changeTable .cAPPROVAL {
  width: 0.5em;
  text-align: center;
}
.changeTable .dataCell.negscore {
  color: red;
}
.changeTable .dataCell.posscore {
  color: #08a400;
}
.changeTable .dataCell.singleLine {
  white-space: nowrap;
}
.changeTable .dataCell.labelNotApplicable {
 background: #F5F5F5;
}
.changeTable .iconHeader {
  border-top: 1px solid backgroundColor;
  border-bottom: 1px solid backgroundColor;
  background-color: trimColor;
}

.changeTable .dataHeader {
  border: 1px solid backgroundColor;
  padding: 2px 6px 1px;
  background-color: trimColor;
  font-style: italic;
  white-space: nowrap;
  color: textColor;
}

.changeTable .dataHeaderHidden {
  display: none;
}

.changeTable .sectionHeader {
  border-top: 8px solid backgroundColor;
  padding: 2px 6px 1px;
  background-color: trimColor;
  white-space: nowrap;
  font-weight: bold;
  color: textColor;
}

.changeTable .emptySection {
  border-left: 1px solid trimColor;
  border-right: 1px solid trimColor;
  border-bottom: 1px solid trimColor;
  font-style: italic;
  padding-left: 25px;
}

.changeTablePrevNextLinks {
  float: right;
  padding-right: 5px;
}
.changeTablePrevNextLinks td {
  width: 5em;
  text-align: right;
}
.changeTablePrevNextLinks .gwt-Hyperlink {
  font-size: 9pt;
  color: #2a5db0;
}

/** Change **/
.avatarInfoPanel {
  margin-right: 10px;
}
.avatarInfoPanel td {
  text-align: center;
}

.infoBlock {
  border-collapse: collapse;
  border-spacing: 0;
}

.infoBlock td {
  padding: 2px 4px 2px 6px;
  border-right: 1px solid trimColor;
  border-bottom: 1px solid trimColor;
  text-align: left;
  white-space: nowrap;
}

.infoBlock td td {
  padding-left: 0px;
  border-right: 0px;
}

.infoBlock td.topmost {
  border-top: 1px solid trimColor;
}

.infoBlock td.header {
  background-color: trimColor;
  font-style: italic;
  text-align: right;
}

.infoBlock td.bottomheader {
  border-bottom: 1px solid trimColor;
}


.patchSetActions {
  margin-bottom: 10px;
}
.patchSetActions .gwt-Button {
  margin-right: 30px;
  font-size: 8pt;
}

.downloadBox {
  min-width: 580px;
  margin: 5px;
  margin-right: 15px;
}
.downloadBoxTable {
  border-spacing: 0;
  width: 100%;
}
.downloadBoxTableCommandColumn {
  text-align: left;
  font-weight: normal;
  white-space: nowrap;
  max-height: 18px;
  width: 80px;
  padding-right: 5px;
}
.downloadBoxSpacer {
  margin-left: 5px;
  margin-right: 5px;
}
.downloadBoxScheme {
  float: right;
}
.downloadBoxCopyLabel {
  font-size: smaller;
  font-family: monospace;
}
.downloadBoxCopyLabel span {
  width: 500px;
  white-space: nowrap;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.downloadBoxCopyLabel .gwt-TextBox {
  padding: 0;
  margin: 0;
  border: 0;
  max-height: 18px;
  width: 500px;
}
.downloadBoxCopyLabel div {
  float: right;
}
.downloadLinkHeader {
  background: trimColor;
  white-space: nowrap;
  border-bottom: 1px solid black;
}
.downloadLinkHeaderGap {
  margin-left: 5em;
}
.downloadLinkList {
  display: inline;
  white-space: nowrap;
}
.downloadLink {
  color: black;
  text-decoration: none;
  white-space: nowrap;
  background: trimColor;
  border-right: 1px solid black;
  padding-left: 0.5em;
  padding-right: 0.5em;
}
a:hover.downloadLink {
  color: black;
}
.downloadLink_Active {
  background: selectionColor;
}
.downloadLinkCopyLabel {
  white-space: pre;
  font-family: mono-font;
  font-size: 12px;
  margin-left: 0.5em;
  margin-right: 0.5em;
}
.downloadLinkCopyLabel .gwt-TextBox {
  width: 40em;
}
.downloadLinkCopyLabel span {
  width: 40em;
  white-space: nowrap;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
}

/** AccountSettings  **/
.usernameField {
  white-space: nowrap;
}
.accountUsername {
  font-family: mono-font;
  font-size: small;
}
.accountPassword {
  font-family: mono-font;
  font-size: small;
}
.sshKeyPanelEncodedKey {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-family: mono-font;
  font-size: small;
}
.sshKeyPanelInvalid {
  white-space: nowrap;
  color: red;
  font-weight: bold;
}
.identityUntrustedExternalId {
  white-space: nowrap;
  color: red;
  font-weight: bold;
}

.accountInfoBlock {
  margin-bottom: 10px;
}
.accountInfoBlock .gwt-Button {
  margin-left: 10px;
}

.addWatchPanel {
  margin-top: 10px;
  padding: 5px 5px 5px 5px;
}
.watchedProjectFilter {
  margin-left: 1em;
  color: grey;
}

.addBranch {
  margin-top: 10px;
  background-color: trimColor;
  padding: 5px 5px 5px 5px;
}

.addSshKeyPanel {
  margin-top: 10px;
  background-color: trimColor;
  padding: 5px 5px 5px 5px;
}

.addSshKeyPanel ol {
  margin-top: 0px;
  margin-bottom: 5px;
}

.addSshKeyPanel td {
  width: 100%;
}

.sshKeyTable td.dataCell, .sshKeyTable td.iconCell {
  vertical-align: top;
}

.createProjectPanel {
  margin-bottom: 10px;
  background-color: trimColor;
  padding: 5px 5px 5px 5px;
}

.sshHostKeyPanel {
  margin-top: 10px;
  border: 1px solid trimColor;
  padding: 5px 5px 5px 5px;
}
.sshHostKeyPanelHeading {
  white-space: nowrap;
  margin-top: 5px;
  margin-left: 1em;
}
.sshHostKeyPanelFingerprintData {
  margin-left: 2em;
  white-space: nowrap;
  font-family: mono-font;
  font-size: small;
}
.sshHostKeyPanelKnownHostEntry {
  margin-left: 2em;
  white-space: nowrap;
  font-family: mono-font;
  font-size: small;
  width: 80em;
}

.contributorAgreementButton {
  font-weight: bold;
}

.contributorAgreementShortDescription {
  margin-left: 20px;
  margin-right: 20px;
  margin-bottom: 10px;
  padding: 5px 5px 5px 5px;
  border: 1px solid #b0bdcc;
}

.contributorAgreementAlreadySubmitted {
  margin-left: 20px;
  margin-right: 20px;
  padding: 5px 5px 5px 5px;
  color: red;
}

.contributorAgreementLegal {
  margin-left: 20px;
  margin-right: 20px;
  padding: 5px 5px 5px 5px;
  border: 1px solid #b0bdcc;
}

.registerScreenSection {
  margin-top: 2em;
}
.registerScreenExplain {
  margin-left: 10px;
  margin-top: 5px;
  margin-bottom: 5px;
  width: 45em;
}
.registerScreenNextLinks {
  margin-top: 2em;
}
.registerScreenNextLinks .gwt-InlineHyperlink {
  margin-left: 2em;
  white-space: nowrap;
}
.registerScreenSection .changeTable {
  width: 45em;
}
.registerScreenSection .addSshKeyPanel {
  background: none;
}
.registerScreenSection .sshHostKeyPanel {
  border: none;
}
.registerScreenSection .sshHostKeyPanel .sshHostKeyPanelKnownHostEntry {
  width: 45em;
}

.projectActions {
  margin-bottom: 10px;
}

.oauthInfoBlock {
  margin-bottom: 10px;
}
.oauthToken {
  font-family: monospace;
  font-size: small;
  width: 40em;
}
.oauthToken span {
  white-space: nowrap;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 38em;
}
.oauthExpires {
  font-family: monospace;
  font-size: small;
  width: 40em;
}
.oauthPanel {
  margin-top: 10px;
  border: 1px solid trimColor;
  padding: 5px 5px 5px 5px;
}
.oauthPanelNetRCHeading {
  margin-top: 5px;
  margin-left: 1em;
  white-space: nowrap;
}
.oauthPanelNetRCEntry {
  margin-top: 5px;
  margin-left: 2em;
  font-family: monospace;
  font-size: small;
  width: 80em;
}
.oauthPanelNetRCEntry span {
  white-space: nowrap;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 78em;
}
.oauthPanelCookieHeading {
  margin-top: 15px;
  margin-left: 1em;
  white-space: nowrap;
}
.oauthPanelCookieEntry {
  margin-top: 5px;
  margin-left: 2em;
  font-family: monospace;
  font-size: small;
  width: 80em;
}
.oauthPanelCookieEntry span {
  white-space: nowrap;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 78em;
}


/** CommentedActionDialog **/
.commentedActionDialog .gwt-DisclosurePanel .header td {
  font-weight: bold;
  white-space: nowrap;
}
.commentedActionDialog .smallHeading {
  font-size: small;
  font-weight: bold;
  white-space: nowrap;
}
.commentedActionDialog .commentedActionMessage {
  margin-left: 10px;
  background: trimColor;
  padding: 5px 5px 5px 5px;
}
.commentedActionDialog .commentedActionMessage textarea {
  font-size: small;
}
.commentedActionDialog .gwt-Hyperlink {
  white-space: nowrap;
  font-size: small;
}
.commentedActionDialog .rebaseContentPanel {
  margin-left: 10px;
  background: trimColor;
  padding: 5px 5px 5px 5px;
  width: 300px;
}
.commentedActionDialog .rebaseContentPanel .rebaseSuggestBox {
  font-size: small;
  width: 100%;
}

/** AccountGroupInfoScreen **/
.groupUUIDPanel {
  margin-bottom: 10px;
}
.groupDescriptionPanel {
  margin-bottom: 3px;
}
.groupNamePanel {
  margin-bottom: 3px;
}
.groupNameTextBox {
  margin-bottom: 2px;
}
.groupOptionsPanel {
  margin-bottom: 5px;
}
.groupOwnerPanel {
  margin-bottom: 3px;
}
.groupOwnerTextBox {
  margin-bottom: 2px;
}


/** AccountGroupMembersScreen **/
.groupMembersTable {
  margin-bottom: 2px;
}
.groupIncludesTable {
  margin-bottom: 2px;
}


/** AddMemberBox **/
.addMemberTextBox {
  margin-right: 2px;
  margin-bottom: 2px;
}


/** ProjectBranchesScreen **/
.specialBranchIconCell {
  background: #ECECEC;
  border-bottom: 1px solid #FFFFFF;
  border-top: 1px solid #FFFFFF;
}
.specialBranchDataCell {
  background: #ECECEC;
  border: 1px solid white;
  font-style: italic;
  padding: 2px 6px 1px;
}

.editHeadButton {
  float: right;
  cursor: pointer;
}

.branchTableDeleteButton {
  margin-top: 5px;
}

.branchTablePrevNextLinks {
  position: relative;
}
.branchTablePrevNextLinks td {
  float: left;
  width: 5em;
  text-align: left;
  padding-right: 10px;
}
.branchTablePrevNextLinks .gwt-Hyperlink {
  font-size: 9pt;
  color: #2a5db0;
}

/** PluginListScreen **/
.pluginsTable {
}

/** ProjectListScreen **/
.projectFilterPanel {
  margin-bottom: 10px;
}
.projectFilterPanel input {
  width: 200px;
}
.projectFilterLabel {
  margin-right: 5px;
}
.projectNameColumn {
  min-width: 300px;
}

.queryIcon {
  position: relative;
  top: 2px;
  margin-right: 3px;
}

/** ProjectSettings */
.maxObjectSizeLimitEffectiveLabel {
  padding-top: 5px;
  padding-left: 5px;
}

.pluginProjectConfigInheritedValue {
  padding-top: 5px;
  padding-left: 5px;
}

/* StringListPanel */
.stringListPanelButtons {
  margin-left: 0.5em;
}
.stringListPanelButtons .gwt-Button {
  margin-right: 2em;
  font-size: 7pt;
  padding: 1px;
}

/* List Screens */
.pagingLink {
  font-size: 18px;
  margin-top: 5px;
  margin-bottom: 15px;
}
